package com.hopu.oa.dao.file;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hopu.oa.entity.file.FileList;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author Secret
 * @create 2021-07-27 下午 02:42
 */
@Mapper
@Repository
public interface FileListDao extends BaseMapper<FileList> {

    int moveFileListByBatch(@Param("mcfileids") String mcfileids, @Param("mctoid") Integer mctoid, @Param("userId") Integer userId);

    @Select("select * from aoa_file_list where file_path=#{filePath}")
    List<FileList> findByFilePath(int filePath);

    @Select("select *from aoa_file_list where path_id=#{path_id} ")
    List<FileList> findByPathId(int pathId);

    @Select("select *from aoa_file_list where file_user_id = #{userId} ")
    List<FileList> findAllFileList(Integer userId);


}
